/*
 * @Description:
 * @Author: py
 * @Date: 2024-07-30
 */
import { reactive } from 'vue'

export function useTable() {
    const gridOptions = reactive<any>({
        align: 'center',
        border: true,
        columnConfig: {
            resizable: true,
        },
        columns: [
            { field: 'returnCode', minWidth: 150, title: '退款编号' },
            { slots: { default: 'afterSaleNo' }, title: '售后单号', width: 150 },
            { slots: { default: 'orderNo' }, title: '订单编号', width: 150 },
            { slots: { default: 'goodsInfo' }, title: '商品信息', width: 200 },
            { slots: { default: 'refundAmount' }, title: '退款金额', width: 120 },
            { slots: { default: 'shipStatus' }, title: '发货状态', width: 80 },
            { slots: { default: 'afterSaleType' }, title: '售后类型', width: 100 },
            { slots: { default: 'afterSaleReason' }, title: '售后原因', width: 120 },
            { slots: { default: 'afterSaleTime' }, title: '售后申请时间', width: 150 },
            { slots: { default: 'status' }, title: '状态', width: 100 },
            { fixed: 'right', slots: { default: 'operate' }, title: '操作', width: 150 },
        ],
        data: [],
        height: 530,
        loading: false,
        showOverflow: false,
    })

    return { gridOptions }
}
